FROM php:7.3.8-fpm

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN echo 'Asia/Shanghai' >/etc/timezone

ADD zhongkeda.list /etc/apt/sources.list


RUN apt-get update && apt-get install -y vim libfreetype6-dev libjpeg-dev libpng-dev  procps \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install gd \
    && docker-php-ext-install pdo_mysql \
    && apt-get install cron -y \
    && rm -r /var/lib/apt/lists/* \


RUN docker-php-ext-install opcache iconv  pdo pdo_mysql



## 安装 mysqli redis

RUN docker-php-ext-install mysqli \

    && docker-php-ext-enable mysqli  \ 

    && pecl install -o -f redis \

    && docker-php-ext-enable redis 
   

## 安装composer
COPY ./php_extension_file/composer.phar /home/extension_file/composer.phar
RUN mv /home/extension_file/composer.phar /usr/local/bin/composer \
    && chmod u+x /usr/local/bin/composer

## 安装Swoole
RUN pecl install swoole-4.6.4 && docker-php-ext-enable swoole
    

ADD php.ini /usr/local/etc/php/php.ini



